﻿using System;

namespace Foothill.Model
{
    public class ForSaleAd
    {
        public int AdId { set; get; }

        public int ModelId { get; set; }
        
        public string ModelName { set; get; }
        
        public int MakeId { set; get; }

        public int YearMade { get; set; }
    
        public string MakeName { set; get; }
        
        public int TransmissionTypeId { set; get; }
        
        public string TransmissionTypeName { set; get; }
        
        public string YearMadeStr { set; get; }
        
        public int Price { set; get; }
        
        public int ColorId { set; get; }
        
        public string ColorName { set; get; }
        
        public string PriceStr { set; get; }
        
        public int MileAge { set; get; }
        
        public string MileAgeStr { set; get; }
        
        public string Description { set; get; }
        
        public DateTime TimePosted { set; get; }
        
        public string ContactPhone { set; get; }
        
        public string ContactEmail { set; get; }

        public string ContactName { set; get; }
        
        public string EditKey { set; get; }
        
        public int StatusId { set; get; }
        
        public string StatusName { set; get; }
        
        public int CityId { set; get; }
        
        public string CityName { set; get; }
        
        public DateTime LastEditTime { set; get; }
        
        public string ProfilePhotoPath { set; get; }
        
        public int VehicleConditionId { set; get; }
        
        public string VehicleConditionName { set; get; }
        
        public int ListingTypeId { set; get; }
        
        public string ListingTypeString { set; get; }

        public int PostedByUserAccountId { set; get; }

        public int NumClickedOn { set; get; }

        public int NumSaved { set; get; }

        public string PostedUserLogoFilePath { set; get; }

        // return a string like "2001 Acura 1.7EL"
        public string GetVehicleTypeString()
        {
            return string.Format("{0} {1} {2}, {3}km", YearMade.ToString(), MakeName, ModelName, MileAge.ToString());
        }
    }

    public class StatsItem
    {
        public int GroupId { set; get; }
        public string GroupName { get; set; }
        public int Count { set; get; }
    }
}
